package cn.iocoder.yudao.module.locale.utils;

/**
 * Description:
 * Author: li
 * Date: 2024/2/19
 */
public class LocaleUtil {

    public static String getLanguageCode(String language) {
        final String[] arr = language.split("-");
        if (arr != null && arr.length == 2) {
            return arr[0];
        }
        return language;
    }

}
